﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Test_ApplicationBD
{
    public partial class FrmRemCD : Form
    {
        public FrmRemCD()
        {
            InitializeComponent();
            Commandehelper.RemplirLsv(listView1, "CD");
        }

        private void button1_Click(object sender, EventArgs e)
        {

            Commandehelper.RequeteComplexe("delete from CD_Musique where Id_CD='" + (listView1.SelectedIndices[0] + 1) + "' ;");
            Commandehelper.RequeteComplexe("delete from CD where ID=" + (listView1.SelectedIndices[0] + 1) + " ;");
            Commandehelper.RemplirLsv(listView1, "CD");
        }
    }
}
